#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <queue>

using namespace std;

class KthLargest {
private:
    int n;
    priority_queue<int, std::vector<int>, std::greater<int>> priQue{};

public:
    KthLargest(int k, vector<int>& nums) {
        n = k;
        for (const auto& num : nums) {
            add(num);
        }
    }
    
    int add(int val) {
        priQue.push(val);
        if (priQue.size() > n) {
            priQue.pop();
        }
        return priQue.top();
    }
};

/**
 * Your KthLargest object will be instantiated and called as such:
 * KthLargest* obj = new KthLargest(k, nums);
 * int param_1 = obj->add(val);
 */

int main()
{
    return 0;
}